#====================================================================================
Codebook
Title: Electoral Role Models: Political Empowerment and Candidate Emergence
Journal: Political Behavior
Authors: Andrew Janusz, Patrick Cunha Silva, and Andrea Junqueira
Contact information: ajanusz@ufl.edu|pcunhasilva@luc.edu|ajunqueira@astate.edu
#====================================================================================

##############
#--Codebook--#
##############

#--blackRDD_final.RData--#
# Original source: Tribunal Superior Eleitoral (TSE), DataSUS, and Instituto Brasileiro de Geografia e Estatística (IBGE) #

# Contains information for the municipalities that had mixed-race in the 2016 elections #

- SG_UE: TSE municipality code                            
- ANO_ELEICAO: election year                       
- run_var_black: running variable, positive values indicate where an Afro-Brazilian candidate won the mayoral office in 2016                     
- run_var_white: running variable, positive values indicate where a white candidate won the mayoral office in 2016                         
- totalBlacks: # of Afro-Brazilian candidates for local council in 2020                        
- totalBlacks_ratio: # of Afro-Brazilian candidates for local council in 2020 divided by district magnitude
- totalBlacks_pct: % of Afro-Brazilian candidates for local council in 2020 among all candidates                    
- totalBlacks_noexp: # of Afro-Brazilian candidates without political experience for local council in 2020                                         
- totalBlacks_noexp_ratio: # of Afro-Brazilian candidates without political experience for local council in 2020 divided by district magnitude         
- totalBlacks_noexp_pct: % of Afro-Brazilian candidates without political experience for local council in 2020 among candidates without political experience
- totalBlacks_exp: # of Afro-Brazilian candidates with political experience for local council in 2020                                                       
- totalBlacks_exp_ratio: # of Afro-Brazilian candidates with political experience for local council in 2020 divided by district magnitude                   
- totalBlacks_exp_pct:  % of Afro-Brazilian candidates with political experience for local council in 2020 among candidates with political experience       
- totalBlacks_noexp_frommp: # of Afro-Brazilian candidates without political experience from the mayor's party for local council in 2020         
- totalBlacks_noexp_frommp_ratio: # of Afro-Brazilian candidates without political experience from the mayor's party for local council in 2020 divided by district magnitude            
- totalBlacks_noexp_frommp_pct: % of Afro-Brazilian candidates without political experience from the mayor's party for local council in 2020 among candidates without political experience                    
- totalPreto: # of Preto candidates for local council in 2020                                                
- totalPreto_ratio: # of Preto candidates for local council in 2020 divided by district magnitude                  
- totalPreto_pct: % of Preto candidates for local council in 2020 among all candidates                                       
- totalPardo: # of Brown candidates for local council in 2020                        
- totalPardo_ratio: # of Brown candidates for local council in 2020 divided by district magnitude                  
- totalPardo_pct: % of Brown candidates for local council in 2020 among all candidates                                                                      
- DS_COR_RACA_WINNER: 2016 mayoral election winner's race                
- DS_COR_RACA_RUNNERUP: 2016 mayoral election runner-up's race                   
- DS_GENERO_WINNER: 2016 mayoral election winner's gender                    
- DS_GENERO_RUNNERUP: 2016 mayoral election runner-up's gender                 
- totalBlackWomen: # of Afro-Brazilian women candidates for local council in 2020                    
- totalBlackWomen_ratio: # of Afro-Brazilian women candidates for local council in 2020 divided by district magnitude  
- totalBlackWomen_pct: % of Afro-Brazilian women candidates for local council in 2020 among all candidates                                  
- totalBlackWomen_noexp: # of Afro-Brazilian women candidates without political experience for local council in 2020          
- totalBlackWomen_noexp_ratio: # of Afro-Brazilian women candidates without political experience for local council in 2020 divided by district magnitude    
- totalBlackWomen_noexp_pct: % of Afro-Brazilian women candidates without political experience for local council in 2020 among candidates without political experience          
- totalBlackWomen_noexp_frommp: # of Afro-Brazilian women candidates without political experience from the mayor's party for local council in 2020          
- totalBlackWomen_noexp_frommp_ratio: # of Afro-Brazilian women candidates without political experience from the mayor's party for local council in 2020 divided by district magnitude            
- totalBlackWomen_noexp_frommp_pct: % of Afro-Brazilian women candidates without political experience from the mayor's party for local council in 2020 among candidates without political experience              
- totalBlackMen: # of Afro-Brazilian men candidates for local council in 2020                    
- totalBlackMen_ratio: # of Afro-Brazilian men candidates for local council in 2020 divided by district magnitude  
- totalBlackMen_pct: % of Afro-Brazilian men candidates for local council in 2020 among all candidates                                  
- totalBlackMen_noexp: # of Afro-Brazilian men candidates without political experience for local council in 2020                                            
- totalBlackMen_noexp_ratio: # of Afro-Brazilian men candidates without political experience for local council in 2020 divided by district magnitude        
- totalBlackMen_noexp_pct: % of Afro-Brazilian men candidates without political experience for local council in 2020 among candidates without political experience          
- totalBlackMen_noexp_frommp: # of Afro-Brazilian men candidates without political experience from the mayor's party for local council in 2020               
- totalBlackMen_noexp_frommp_ratio: # of Afro-Brazilian men candidates without political experience from the mayor's party for local council in 2020 divided by district magnitude            
- totalBlackMen_noexp_frommp_pct: % of Afro-Brazilian men candidates without political experience from the mayor's party for local council in 2020 among candidates without political experience     
- totalWhiteWomen: # of white women candidates for local council in 2020                    
- totalWhiteWomen_ratio: # of white women candidates for local council in 2020 divided by district magnitude  
- totalWhiteWomen_pct: % of white women candidates for local council in 2020 among all candidates                                  
- totalWhiteWomen_noexp: # of white women candidates without political experience for local council in 2020                                                 
- totalWhiteWomen_noexp_ratio: # of white women candidates without political experience for local council in 2020 divided by district magnitude           
- totalWhiteWomen_noexp_pct: % of white women candidates without political experience for local council in 2020 among candidates without political experience
- totalWhiteWomen_noexp_frommp: # of white women candidates without political experience from the mayor's party for local council in 2020               
- totalWhiteWomen_noexp_frommp_ratio: # of white women candidates without political experience from the mayor's party for local council in 2020 divided by district magnitude            
- totalWhiteWomen_noexp_frommp_pct: % of white women candidates without political experience from the mayor's party for local council in 2020 among candidates without political experience  
- totalWhiteMen: # of white men candidates for local council in 2020                                         
- totalWhiteMen_ratio: # of white men candidates for local council in 2020 divided by district magnitude                 
- totalWhiteMen_pct: % of white men candidates for local council in 2020 among all candidates                                                   
- totalWhiteMen_noexp: # of white men candidates without political experience for local council in 2020                                                 
- totalWhiteMen_noexp_ratio: # of white men candidates without political experience for local council in 2020 divided by district magnitude               
- totalWhiteMen_noexp_pct: % of white men candidates without political experience for local council in 2020 among candidates without political experience   
- totalWhiteMen_noexp_frommp: # of white men candidates without political experience from the mayor's party for local council in 2020                     
- totalWhiteMen_noexp_frommp_ratio: # of white men candidates without political experience from the mayor's party for local council in 2020 divided by district magnitude              
- - totalWhiteMen_noexp_frommp_pct: % of white men candidates without political experience from the mayor's party for local council in 2020 among candidates without political experience              
- woman: if the 2016 mayoral race winner is a woman                             
- times.as.candidate: number of times that 2016 mayoral race winner ran for political office since 1998                
- age: mayor' age                               
- times.as.winner: number of times that the 2016 mayoral race winner won political office since 1998                                   
- incumbent: if the 2016 mayoral race winner was the incumbent                         
- married: if the 2016 mayoral race winner was married                            
- college: if the 2016 mayoral race winner has a college degree                           
- merchant: if the 2016 mayoral race winner's occupation = merchant                          
- politician: if the 2016 mayoral race winner's occupation = politician                         
- servant: if the 2016 mayoral race winner's occupation = public servant                           
- business: if the 2016 mayoral race winner's occupation = business person                          
- doctor: if the 2016 mayoral race winner's occupation = medical doctor                            
- administrator: if the 2016 mayoral race winner's occupation = administrator                     
- farmer: if the 2016 mayoral race winner's occupation = farmer                            
- black_pop_pct: share of Afro-Brazilian population in the municipality 2010
- urban_pct: share of urban population in the municipality 2010                         
- ln_gdp18_pc: municipality's gdp per capita 2018                       
- female_pct: share of female population in the municipality 2010                             
- population2018: municipality population in 2018                    
                 
#--candRace.RData--#

# Original source: Tribunal Superior Eleitoral (TSE) #

# Contains information about the race for winner and runner-up in the 2016 mayoral election #

- SG_UE: TSE municipality code    
- DS_COR_RACA_WINNER: 2016 mayoral election winner's race                
- DS_COR_RACA_RUNNERUP: 2016 mayoral election runner-up's race  


#--descrData.RData--#

# Original source: Tribunal Superior Eleitoral (TSE) #

# Contains information about the racial and gender composition of candidates for local council since 2004 for all municipalities #

- SG_UE: TSE municipality code                            
- ANO_ELEICAO: election year  
- n_ver: # of candidates for local council 
- woman_ver: # of women candidates for local council 
- afroBR_ver: # of Afro-Brazilian candidates for local council 
- QT_VAGAS: district magnitude
- woman_pref: if the mayor is a woman     
- afroBR_pref: if the mayor is an Afro-Brazilian
- woman_ver_pct: % of women candidates for local council 
- afroBR_ver_pct: % of Afro-Brazilian candidates for local council 
- woman_ver_ratio: # of women candidates for local council divided by district magnitude
- afroBR_ver_ratio: # of Afro-Brazilian candidates for local council divided by district magnitude


#--WomenRDD_final.RData--#
# Original source: Tribunal Superior Eleitoral (TSE), DataSUS, and Instituto Brasileiro de Geografia e Estatística (IBGE) #

# Contains information for the municipalities that had mixed-gender races in the 2008, 2012, and 2016 elections #

- SG_UE: TSE municipality code
- ANO_ELEICAO: election year
- run_var_woman: running variable, positive values indicate where a woman candidate won the mayoral office
- totalWomen: # of women candidates for local council
- totalWomen_ratio: # of women candidates for local council divided by district magnitude
- totalWomen_pct: % of women candidates for local council among all candidates  
- totalWomen_noexp: # of women candidates without political experience running for local council
- totalWomen_noexp_ratio: # of women candidates without political experience running for local council divided by district magnitude  
- totalWomen_noexp_pct: % of women candidates without political experience running for local council among candidates without political experience  
- totalWomen_noexp_frommp: # of women candidates without political experience from the mayor's party running for local council
- totalWomen_noexp_frommp_ratio: # of women candidates without political experience from the mayor's party running for local council divided by district magnitude  
- totalWomen_noexp_frommp_pct: % of women candidates without political experience from the mayor's party running for local council among candidates without political experience
- totalWomen_exp: # of women candidates with political experience running for local council
- totalWomen_exp_ratio: # of women candidates with political experience running for local council divided by district magnitude  
- totalWomen_exp_pct: % of women candidates with political experience running for local council among candidates with political experience  
- DS_COR_RACA_WINNER: mayoral election winner's race                
- DS_COR_RACA_RUNNERUP: mayoral election runner-up's race                   
- DS_GENERO_WINNER: mayoral election winner's gender                    
- DS_GENERO_RUNNERUP: mayoral election runner-up's gender 
- black: if the mayoral race winner is Afro-Brazilian 
- times.as.candidate: number of times the mayoral race winner ran for political office since 1998        
- age: mayor' age 
- times.as.winner: number of times the mayoral race winner won political office since 1998 
- incumbent: if the mayoral race winner was the incumbent
- married: if the mayoral race winner was married                            
- college: if the mayoral race winner has a college degree                           
- merchant: if the mayoral race winner's occupation = merchant                          
- politician: if the mayoral race winner's occupation = politician       
- servant: if the mayoral race winner's occupation = public servant                           
- business: if the mayoral race winner's occupation = business person                          
- doctor: if the mayoral race winner's occupation = medical doctor                            
- administrator: if the mayoral race winner's occupation = administrator                     
- farmer: if the mayoral race winner's occupation = farmer                 
- black_pop_pct: share of Afro-Brazilian population in the municipality 2010
- urban_pct: share of urban population in the municipality 2010 
- ln_gdp_pc: municipality's gdp per capita (2010, 2014, and 2018)
- female_pct: share of female population in the municipality 2010
- population: municipality population (2010, 2014, and 2018)


#--womenRDD_since2000_final.RData--#
# Original source: Tribunal Superior Eleitoral (TSE), DataSUS, and Instituto Brasileiro de Geografia e Estatística (IBGE) #

# Contains information for the municipalities that had mixed-gender races in the 2000, 2004, 2008, 2012, and 2016 elections #

- SG_UE: TSE municipality code
- ANO_ELEICAO: election year
- totalWomen: # of women candidates for local council
- totalWomen_ratio: # of women candidates for local council divided by district magnitude
- totalWomen_pct: % of women candidates for local council among all candidates
- totalWomen_noexp: # of women candidates without political experience running for local council
- totalWomen_noexp_pct: % of women candidates without political experience running for local council among candidates without political experience
- totalWomen_noexp_ratio: # of women candidates without political experience running for local council divided by district magnitude
- totalWomen_noexp_frommp: # of women candidates without political experience from the mayor's party running for local council
- totalWomen_noexp_frommp_ratio: # of women candidates without political experience from the mayor's party running for local council divided by district magnitude
- totalWomen_noexp_frommp_pct: % of women candidates without political experience from the mayor's party running for local council among candidates without political experience
- run_var_woman: running variable, positive values indicate where a woman candidate won the mayoral office 


#--df_spatial_nb_std_final.RData--#
# Original source: Tribunal Superior Eleitoral (TSE), DataSUS, and Instituto Brasileiro de Geografia e Estatística (IBGE) #

- SG_UE: TSE municipality code
- ANO_ELEICAO: election year
- n_women_cands_council: # of women candidates for local council
- n_cands_women_no_exp_council: # of women candidates without political experience running for local council
- n_vagas_council: district magnitude 
- n_cands_council: # of candidates running for local council
- lag_woman_elected_mayor: if a woman was elected as the mayor in the previous municipal election
- lag_n_women_elected_council: # of women elected for local council in the previous municipal election
- lag_n_women_cands_council: # of women running for local council in the previous municipal election
- yr_census: indicates the census year considered for the following variables: perc_literate, perc_female, perc_urban, perc_white, and log_pop   
- perc_literate: % of the municipal population that is literate
- perc_female: % of the municipal population that is women
- perc_urban: % of the municipal population that resides in urban areas
- perc_white: % of the municipal population that is white
- log_pop: municipal population (log)
- year_gdp: indicates the year in which the variable "pib_pc" was measured
- pib_pc: gdp per capita
- lag_perc_votes_women_council: percent of votes given to women candidates in the previous city council elections
- lag_perc_votes_left_council: percent of votes given to left-wing parties in the previous city council elections
- spatial_woman_mayor: variable created by multiplying the variable if the mayor elected in the past election was a woman by a row-standardized spatial matrix that contains information about municipalities sharing a border. In practical terms, the result of this multiplication yields for each municipality the proportion of its neighbors that elected a woman mayor in the past election.
- uf: state
- log_n_women_cands_council: # of women candidates for local council (log)
- log_n_cands_women_no_exp_council: # of women candidates without political experience running for local council (log)


#--df_spatial_nb_std_race_final.RData--#
# Original source: Tribunal Superior Eleitoral (TSE), DataSUS, and Instituto Brasileiro de Geografia e Estatística (IBGE) #

- ANO_ELEICAO: election year
- SG_UE: TSE municipality code
- n_black_cands_council: # of Afro-Brazilian candidates running for local council
- n_cands_black_no_exp_council: # of Afro-Brazilian candidates without political experience running for local council
- n_vagas_council: district magnitude 
- n_cands_council: # of candidates running for local council
- lag_black_elected_mayor: if an Afro-Brazilian was elected as the mayor in the previous municipal election
- lag_n_black_elected_council: # of Afro-Brazilians elected for local council in the previous municipal election
- lag_n_black_cands_council: # of Afro-Brazilians running for local council in the previous municipal election
- yr_census: indicates the census year considered for the following variables: perc_literate, perc_female, perc_urban, perc_white, and log_pop
- perc_literate: % of the municipal population that is literate
- perc_female: % of the municipal population that is women
- perc_urban: % of the municipal population that resides in urban areas
- perc_white: % of the municipal population that is white
- log_pop: municipal population (log)
- year_gdp: indicates the year in which the variable "pib_pc" was measured
- pib_pc: gdp per capita
- lag_perc_votes_left_council: percent of votes given to left-wing parties in the previous city council elections
- spatial_black_mayor: variable created by multiplying the variable if the mayor elected in the past election was an Afro-Brazilian by a row-standardized spatial matrix that contains information about municipalities sharing a border. In practical terms, the result of this multiplication yields for each municipality the proportion of its neighbors that elected an Afro-Brazilian mayor in the past election.
- uf: state
- log_n_black_cands_council: # of Afro-Brazilian candidates running for local council (log)
- log_n_cands_black_no_exp_council: # of Afro-Brazilian candidates without political experience running for local council (log)












